package com.sky.service.impl;

import com.sky.entity.FormUserMaterial;
import com.sky.mapper.FormUserMaterialMapper;
import com.sky.service.FormUserMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

@Service
public class FormUserMaterialServiceImpl implements FormUserMaterialService {

    @Autowired
    private FormUserMaterialMapper formUserMaterialMapper;

    @Override
    @Transactional
    public void saveFormDataBatch(List<FormUserMaterial> formDataList) {
        formUserMaterialMapper.insertBatch(formDataList);
    }

    // 添加新方法的实现
    @Override
    public List<FormUserMaterial> getFormDataByOrderId(String orderId) {
        return formUserMaterialMapper.getByOrderId(orderId);
    }
}